
% Driver script for the function computererrbounds_network()
% 
% P. Ajith, 8 Aug 2009
% 
% $Id:$

clear 

Params.startPhase = 0;
Params.startTime = 0;
Params.fLower = 40;
Params.eta = 0.25;

MVec =  logspace(1,2,10);

detNameVec = {'LHO'};
noisePSDVec = {'LIGO'};
lambdaVec = {'dL','M','eta','t0','phi0'};

Params.theta = 0.810795263059348;
Params.phi = -2.08405676907401;
Params.psi = 0;
Params.iota = 0;
Params.dL = 100;
Params.dEff = 100;

% compute the error bounds for each pair of masses
for iM=1:length(MVec)

    Params.totalMass = MVec(iM);

    [sigma(iM,:), covMat, snr(iM), snrVec, condNum(iM), condNumVec...
        ] = computeerrbounds_network(Params, detNameVec, noisePSDVec, lambdaVec)
    
end

% plot the RMS errors against the total mass
for iParam = 1:length(sigma(1,:))

    figure(10+iParam)
    loglog(MVec,sigma(:,iParam),'r--')
    grid on
    xlabel('M/M_{sun}')
    ylabel(sprintf('\\Delta %s', lambdaVec{iParam}))

end

